package com.lzh.common.to.es;

import com.sun.org.apache.bcel.internal.generic.LineNumberGen;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @ClassName SkuEsModel
 * @Description TODO
 * @Author liuzhihui
 * @Date 2020/8/24 16:24
 * @Version 1.0
 **/
@Data
public class SkuEsModel  implements Serializable {
    private static final long serialVersionUID = 5249927680515883427L;

    private Long skuId;
    private Long spuId;
    private String skuTitle;
    private BigDecimal skuPrice;
    private String skuImg;
    private Long saleCount;
    private Boolean hasStock;
    private Long hotScore;
    private Long brandId;
    private Long catalogId;
    private String brandName;
    private String brandImg;
    private String catalogName;
    private List<Attrs> attrs;

    public void setHasStock(Boolean hasStock) {
        this.hasStock = hasStock == null ? true : hasStock;
    }
    @Data
    public static class Attrs {
        private Long attrId;
        private String attrName;
        private String attrValue;
    }
}
